<?php

namespace App\Entities\Base;

use Doctrine\ORM\Mapping as ORM;

/**
 * App\Entities\Base\VulnerabilityHttpData
 *
 * @ORM\MappedSuperclass
 * @ORM\Table(name="`vulnerability_http_data`", indexes={
 *     @ORM\Index(name="vulnerability_http_data_fk_idx", columns={"`vulnerability_id`"})
 * })
 */
class VulnerabilityHttpData extends AbstractEntity
{
    /** Table name constant */
    const TABLE_NAME = 'vulnerability_http_data';

    /** Column name constants */
    const ISSUE_DETAIL         = 'issue_detail';
    const HTTP_PORT            = 'http_port';
    const HTTP_METHOD          = 'http_method';
    const HTTP_BANNER          = 'http_banner';
    const HTTP_STATUS_CODE     = 'http_status_code';
    const HTTP_URI             = 'http_uri';
    const HTTP_TEST_PARAMETER  = 'http_test_parameter';
    const HTTP_RAW_REQUEST     = 'http_raw_request';
    const HTTP_RAW_RESPONSE    = 'http_raw_response';
    const HTTP_ATTACK_PATTERN  = 'http_attack_pattern';
    const HTTP_ATTACK_RESPONSE = 'http_attack_response';
    const VULNERABILITY_ID     = 'vulnerability_id';
    const VULNERABILITY        = 'vulnerability';

    /**
     * @ORM\Id
     * @ORM\Column(name="`id`", type="integer", options={"unsigned":true})
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    /**
     * @ORM\Column(name="`issue_detail`", type="text", nullable=true)
     */
    protected $issue_detail;

    /**
     * @ORM\Column(name="`http_port`", type="integer", nullable=true, options={"unsigned":true})
     */
    protected $http_port;

    /**
     * @ORM\Column(name="`http_method`", type="string", nullable=true)
     */
    protected $http_method;

    /**
     * @ORM\Column(name="`http_banner`", type="string", length=45, nullable=true)
     */
    protected $http_banner;

    /**
     * @ORM\Column(name="`http_status_code`", type="integer", nullable=true, options={"unsigned":true})
     */
    protected $http_status_code;

    /**
     * @ORM\Column(name="`http_uri`", type="text", nullable=true)
     */
    protected $http_uri;

    /**
     * @ORM\Column(name="`http_test_parameter`", type="string", length=45, nullable=true)
     */
    protected $http_test_parameter;

    /**
     * @ORM\Column(name="`http_raw_request`", type="text", nullable=true)
     */
    protected $http_raw_request;

    /**
     * @ORM\Column(name="`http_raw_response`", type="text", nullable=true)
     */
    protected $http_raw_response;

    /**
     * @ORM\Column(name="`http_attack_pattern`", type="text", nullable=true)
     */
    protected $http_attack_pattern;

    /**
     * @ORM\Column(name="`http_attack_response`", type="text", nullable=true)
     */
    protected $http_attack_response;

    /**
     * @ORM\Column(name="`vulnerability_id`", type="integer", nullable=true, options={"unsigned":true})
     */
    protected $vulnerability_id;

    /**
     * @ORM\Column(name="`created_at`", type="datetime")
     */
    protected $created_at;

    /**
     * @ORM\Column(name="`updated_at`", type="datetime")
     */
    protected $updated_at;

    /**
     * @ORM\ManyToOne(targetEntity="Vulnerability", inversedBy="vulnerabilityHttpData", cascade={"persist"})
     * @ORM\JoinColumn(name="`vulnerability_id`", referencedColumnName="`id`", onDelete="CASCADE")
     */
    protected $vulnerability;

    public function __construct()
    {
    }

    /**
     * Set the value of id.
     *
     * @param integer $id
     * @return \App\Entities\Base\VulnerabilityHttpData
     */
    public function setId($id)
    {
        $this->id = $id;

        return $this;
    }

    /**
     * Get the value of id.
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set the value if issue_detail.
     *
     * @param string $issue_detail
     * @return \App\Entities\Base\VulnerabilityHttpData
     */
    public function setIssueDetail($issue_detail)
    {
        $this->issue_detail = $issue_detail;

        return $this;
    }

    /**
     * Get the value of issue_detail.
     *
     * @return string
     */
    public function getIssueDetail()
    {
        return $this->issue_detail;
    }

    /**
     * Set the value of http_port.
     *
     * @param integer $http_port
     * @return \App\Entities\Base\VulnerabilityHttpData
     */
    public function setHttpPort($http_port)
    {
        $this->http_port = $http_port;

        return $this;
    }

    /**
     * Get the value of http_port.
     *
     * @return integer
     */
    public function getHttpPort()
    {
        return $this->http_port;
    }

    /**
     * Set the value of http_method.
     *
     * @param string $http_method
     * @return \App\Entities\Base\VulnerabilityHttpData
     */
    public function setHttpMethod($http_method)
    {
        $this->http_method = $http_method;

        return $this;
    }

    /**
     * Get the value of http_method.
     *
     * @return string
     */
    public function getHttpMethod()
    {
        return $this->http_method;
    }

    /**
     * Set the value of http_banner.
     *
     * @param string $http_banner
     * @return \App\Entities\Base\VulnerabilityHttpData
     */
    public function setHttpBanner($http_banner)
    {
        $this->http_banner = $http_banner;

        return $this;
    }

    /**
     * Get the value of http_banner.
     *
     * @return string
     */
    public function getHttpBanner()
    {
        return $this->http_banner;
    }

    /**
     * Set the value of http_status_code.
     *
     * @param integer $http_status_code
     * @return \App\Entities\Base\VulnerabilityHttpData
     */
    public function setHttpStatusCode($http_status_code)
    {
        $this->http_status_code = $http_status_code;

        return $this;
    }

    /**
     * Get the value of http_status_code.
     *
     * @return integer
     */
    public function getHttpStatusCode()
    {
        return $this->http_status_code;
    }

    /**
     * Set the value of http_uri.
     *
     * @param string $http_uri
     * @return \App\Entities\Base\VulnerabilityHttpData
     */
    public function setHttpUri($http_uri)
    {
        $this->http_uri = $http_uri;

        return $this;
    }

    /**
     * Get the value of http_uri.
     *
     * @return string
     */
    public function getHttpUri()
    {
        return $this->http_uri;
    }

    /**
     * Set the value of http_test_parameter.
     *
     * @param string $http_test_parameter
     * @return \App\Entities\Base\VulnerabilityHttpData
     */
    public function setHttpTestParameter($http_test_parameter)
    {
        $this->http_test_parameter = $http_test_parameter;

        return $this;
    }

    /**
     * Get the value of http_test_parameter.
     *
     * @return string
     */
    public function getHttpTestParameter()
    {
        return $this->http_test_parameter;
    }

    /**
     * Set the value of http_raw_request.
     *
     * @param string $http_raw_request
     * @return \App\Entities\Base\VulnerabilityHttpData
     */
    public function setHttpRawRequest($http_raw_request)
    {
        $this->http_raw_request = $http_raw_request;

        return $this;
    }

    /**
     * Get the value of http_raw_request.
     *
     * @return string
     */
    public function getHttpRawRequest()
    {
        return $this->http_raw_request;
    }

    /**
     * Set the value of http_raw_response.
     *
     * @param string $http_raw_response
     * @return \App\Entities\Base\VulnerabilityHttpData
     */
    public function setHttpRawResponse($http_raw_response)
    {
        $this->http_raw_response = $http_raw_response;

        return $this;
    }

    /**
     * Get the value of http_raw_response.
     *
     * @return string
     */
    public function getHttpRawResponse()
    {
        return $this->http_raw_response;
    }

    /**
     * Set the value of http_attack_pattern.
     *
     * @param string $http_attack_pattern
     * @return \App\Entities\Base\VulnerabilityHttpData
     */
    public function setHttpAttackPattern($http_attack_pattern)
    {
        $this->http_attack_pattern = $http_attack_pattern;

        return $this;
    }

    /**
     * Get the value of http_attack_pattern.
     *
     * @return string
     */
    public function getHttpAttackPattern()
    {
        return $this->http_attack_pattern;
    }

    /**
     * Set the value of http_attack_response.
     *
     * @param string $http_attack_response
     * @return \App\Entities\Base\VulnerabilityHttpData
     */
    public function setHttpAttackResponse($http_attack_response)
    {
        $this->http_attack_response = $http_attack_response;

        return $this;
    }

    /**
     * Get the value of http_attack_response.
     *
     * @return string
     */
    public function getHttpAttackResponse()
    {
        return $this->http_attack_response;
    }

    /**
     * Get the value of vulnerability_id.
     *
     * @return int
     */
    public function getVulnerabilityId()
    {
        return $this->vulnerability_id;
    }

    /**
     * Set the value of vulnerability_id.
     *
     * @param int $vulnerability_id
     * @return VulnerabilityHttpData
     */
    public function setVulnerabilityId($vulnerability_id)
    {
        $this->vulnerability_id = $vulnerability_id;

        return $this;
    }

    /**
     * Set the value of created_at.
     *
     * @param \DateTime $created_at
     * @return \App\Entities\Base\VulnerabilityHttpData
     */
    public function setCreatedAt($created_at)
    {
        $this->created_at = $created_at;

        return $this;
    }

    /**
     * Get the value of created_at.
     *
     * @return \DateTime
     */
    public function getCreatedAt()
    {
        return $this->created_at;
    }

    /**
     * Set the value of updated_at.
     *
     * @param \DateTime $updated_at
     * @return \App\Entities\Base\VulnerabilityHttpData
     */
    public function setUpdatedAt($updated_at)
    {
        $this->updated_at = $updated_at;

        return $this;
    }

    /**
     * Get the value of updated_at.
     *
     * @return \DateTime
     */
    public function getUpdatedAt()
    {
        return $this->updated_at;
    }

    /**
     * Get the related Vulnerability entity (many to one).
     *
     * @return File
     */
    public function getVulnerability()
    {
        return $this->vulnerability;
    }

    /**
     * Set the related Vulnerability entity (many to one).
     *
     * @param Vulnerability $vulnerability
     * @return VulnerabilityHttpData
     */
    public function setVulnerability(Vulnerability $vulnerability)
    {
        $this->vulnerability = $vulnerability;

        return $this;
    }

    /**
     * Get the display name for the entity
     *
     * @param bool $plural
     * @return string
     */
    public function getDisplayName(bool $plural = false): string
    {
        return 'Vulnerability Http Data';
    }

    public function __sleep()
    {
        return array('id', 'issue_detail', 'http_port', 'http_method', 'http_banner', 'http_status_code', 'http_uri', 'http_test_parameter', 'http_raw_request', 'http_raw_response', 'http_attack_pattern', 'http_attack_response', 'vulnerability_id', 'created_at', 'updated_at');
    }
}